<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateSnapshotsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('snapshots', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->integer('child_id')->comment("孩子表id");
            $table->integer('device_id')->comment("设备id");
            $table->integer('game_id')->default(0)->comment("训练项目id");
            $table->integer('history_id')->default(0)->comment("训练记录id");
            $table->integer('image')->comment("图片");
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('snapshots');
    }
}
